﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace console.demo
{
    public class StreamReaderDemo
    {
        public StreamReaderDemo() { }
        public StreamReaderDemo(string input) { }
        public void get()
        {
            try
            {
                using (StreamReader stream = new StreamReader("test.dat"))
                {
                    string line;
                    while ((line = stream.ReadLine()) != null)
                    {
                        Console.WriteLine(line);
                    }
                }
            }
            catch (Exception e)
            {

                throw e;
            }
            Console.ReadKey();
        }
    }
}
